package fgl.common.framework.hessian.client;

import com.caucho.hessian.client.HessianProxyFactory;
import fgl.common.framework.hessian.server.inter.HessianTestInter;

import java.net.MalformedURLException;

/**
 * @author fuguangli
 * @description 前沿类
 * @Create date:    2017/7/5
 */
public class HessianTestClient {
    public static void main(String[] args) throws MalformedURLException {
        Long startTime = System.currentTimeMillis();
        String url = "http://127.0.0.1/hessian/hessianServiceExporter";
        HessianProxyFactory factory = new HessianProxyFactory();
        HessianTestInter service = (HessianTestInter) factory.create(HessianTestInter.class, url);
        System.err.println(service.hello());
        System.err.println("duration=" + (System.currentTimeMillis() - startTime));
    }
}
